﻿using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using System.Net.Http;
using System.Text;
using ZenSystemService.Api.Common.HttpCommunication;
using ZenSystemService.Api.DTOs;
using ZenSystemService.Api.DTOs.TrainingReport;

namespace ZenSystemService.Api.Services
{
    public class ZenBrightService
    {
        private readonly HttpClient _zenBrightApiClient;
        public ZenBrightService(IHttpClientFactory httpClientFactory)
        {
            _zenBrightApiClient = httpClientFactory.CreateClient("ZenBrightApiClient");
        }

        public async Task<HttpResponseMessage> GetZenBrightReportAsync<T>(string url, T data)
        {
            return await _zenBrightApiClient.PostAsJsonAsync(url, data);
        }
    }
}
